<?php //pack11class

class Currency {

    public $label="Undefined";
    public $id=0;
    public $rate=1;
    public $units=1;
    public $system="Undefined";
    public $traceEnabled=true;
    public $city24="CURRENCY_EUR";

    public function setFromSQL($data) {
        if(!is_array($data)) return false;
        foreach($this as $key=>$value) {
            if(array_key_exists($key, $data)) {
                if($key=="label") {
                    $this->label=LabelManager::getLabel($data[$key]);
                } else {
                    $this->$key=$data[$key];
                }
            }
        }
    }

    public function __toString() {
        return $this->label;
    }
}
?>
